class Tools {
    /**
     * 获取位图
     */
	public static createBitmapByName(name: string) {
        let result = new egret.Bitmap();
        let texture: egret.Texture = RES.getRes(name);
        result.texture = texture;
        return result;
    }
    /**
     * 获取影片
     */
    public static createMovieClipByName(file:string,name:string){
        let data = RES.getRes(file+"_json");
        let txtr = RES.getRes(file+"_png");
        let mcFactory: egret.MovieClipDataFactory = new egret.MovieClipDataFactory(data, txtr);
        let behavior2 = new egret.MovieClip(mcFactory.generateMovieClipData(name));
        return behavior2;
    }
    /**
     * 获取多个影片
     */
    public static getMovieClipList(file:string,arr:Array<string>){
        let data = RES.getRes(file+"_json");
        let txtr = RES.getRes(file+"_png");
        let mcFactory: egret.MovieClipDataFactory = new egret.MovieClipDataFactory(data, txtr);
        let result=new Array<egret.MovieClip>();
        for(let i=0;i<arr.length;i++){
            let name=arr[i];
            result.push(new egret.MovieClip(mcFactory.generateMovieClipData(name)));
        }
        return result;
    }
	public constructor() {
	}
}